diff options
| author | Jay V <[email protected]> | 2025-08-29 19:20:12 -0400 |
|---|---|---|
| committer | Jay V <[email protected]> | 2025-08-29 19:20:18 -0400 |
| commit | b40c02e2583c6e35f97849e98f66609e67dac322 (patch) | |
| tree | 1cd8e5be5997e8752d05af1b04afdd53392fd580 /cloud/app/src/routes/workspace/[id].tsx | |
| parent | 058163333d7867b47626a11464f26b3e3556f29d (diff) | |
| download | opencode-b40c02e2583c6e35f97849e98f66609e67dac322.tar.gz opencode-b40c02e2583c6e35f97849e98f66609e67dac322.zip | |
ignore: cloud balance section
Diffstat (limited to 'cloud/app/src/routes/workspace/[id].tsx')
| -rw-r--r-- | cloud/app/src/routes/workspace/[id].tsx | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/cloud/app/src/routes/workspace/[id].tsx b/cloud/app/src/routes/workspace/[id].tsx index 8e6a0ee65..e3eac121b 100644 --- a/cloud/app/src/routes/workspace/[id].tsx +++ b/cloud/app/src/routes/workspace/[id].tsx @@ -130,7 +130,7 @@ const dummyPaymentData = [ }, ] -export default function () { +export default function() { const actor = createAsync(() => getActor()) onMount(() => { console.log("MOUNTED", actor()) @@ -366,15 +366,26 @@ export default function () { <section data-slot="balance-section"> <div data-slot="section-title"> <h2>Balance</h2> - <p>Manage your billing and add credits to your account.</p> + <p>Add credits to your account.</p> </div> <div data-slot="balance"> - <p> - {(() => { - const balanceStr = ((billingInfo()?.billing?.balance ?? 0) / 100000000).toFixed(2) - return `$${balanceStr === "-0.00" ? "0.00" : balanceStr}` - })()} - </p> + <div + data-slot="amount" + classList={{ + danger: (() => { + const balanceStr = ((billingInfo()?.billing?.balance ?? 0) / 100000000).toFixed(2) + return balanceStr === "0.00" || balanceStr === "-0.00" + })(), + }} + > + <span data-slot="currency">$</span> + <span data-slot="value"> + {(() => { + const balanceStr = ((billingInfo()?.billing?.balance ?? 0) / 100000000).toFixed(2) + return balanceStr === "-0.00" ? "0.00" : balanceStr + })()} + </span> + </div> <button color="primary" disabled={isLoading()} onClick={handleBuyCredits}> {isLoading() ? "Loading..." : "Buy Credits"} </button> |
